with open('src_dst.graph',"w") as graph:
    graph.write("src,dst\n")
    with open('soc-LiveJournal1.txt',"r") as file:
        text_lines = file.readlines()
        i = 0
        for line in text_lines:
            line=line.strip('\n')
            if line[0] != "#":
                line = line.split("\t")
                u = int(line[0])
                v = int(line[1])
                if u < v:
                    graph.write(str(u) + "," + str(v) + "\n")
            i+=1
            if(i % 10000 == 0):
                print(i)
